/**创建默认视频流(有音无图像)*/
export const createModel = (video: boolean, audio: boolean) => navigator.mediaDevices.getUserMedia({
    video: video, audio: audio
})
/**分享桌面*/
export const share = (video: boolean, audio: boolean) => navigator.mediaDevices.getDisplayMedia({
    video: video, audio: audio
})


//结束视频
export const OffMediaStream = (stream: any) => {
    try {
        for (const track of stream.getTracks()) {
            track.stop();
        }
    } catch (e) {
        console.log(e)
    }
}
